package com.xliang.spider.version04.dao.impl;

import com.xliang.spider.version04.dao.SpiderVideoDao;
import com.xliang.spider.version04.dao.impl.base.BaseDaoImpl;
import com.xliang.spider.version04.pojo.VideoEntity;
import org.springframework.stereotype.Repository;

import java.util.List;
import java.util.Map;

/**
 * ${DESCRIPTION}
 *
 * @author xiongl
 * @create 2016-06-21 18:00
 */
@Repository
public class SpiderVideoDaoImpl extends BaseDaoImpl implements SpiderVideoDao
{
    @Override
    public int insertVideo(VideoEntity video)
        throws Exception
    {
        return getSqlSession().insert("LessonMapper.insertVideo", video);
    }
    
    @Override
    public int updateVideo(VideoEntity video)
        throws Exception
    {
        return getSqlSession().update("LessonMapper.updateVideo", video);
    }

    @Override
    public int updateVideoById(VideoEntity video)
        throws Exception
    {
        return getSqlSession().update("LessonMapper.updateVideoById", video);
    }

    @Override
    public List<VideoEntity> findVideoList()
        throws Exception
    {
        return getSqlSession().selectList("LessonMapper.findVideoList");
    }
}
